home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / devel / lang / tcl / xf2.3-p / xf2 / xf2.3 / FAQ.running < prev    next >
Encoding:
Text File  |  1994-01-05  |  14.1 KB  |  364 lines

  1. Frequently asked questions about RUNNING XF:
  2.  
  3. Index:
  4. ======
  5.  
  6. R-1) How can I change the path/filenames that are used by XF ?
  7. R-2) How can I create multiple toplevel windows ?
  8. R-3) How can I show/hide toplevel windows ?
  9. R-4) How can I make a widget the "current widget" ?
  10. R-5) How can I bind actions to buttons ?
  11. R-6) How can I cut/copy/paste a widget ?
  12. R-7) How can I delete a widget ?
  13. R-8) How can I create templates ?
  14. R-9) How can I change the order of menubutton items ?
  15. R-10) How can I change the order of packed children ?
  16. R-11) How can I write my own procedures ?
  17. R-12) How can I copy/paste between text fields ?
  18. R-13) How can I retrieve the name of a specific widget ?
  19. R-14) How can I write source that is evaluated before XF
  20.       (and the created application) is actually started ?
  21. R-15) Is there a way to select colors/fonts etc. interactively ?
  22. R-16) How can I set widget names when they are created ?
  23. R-17) How can I change widget names ?
  24. R-18) How can I access global variables in the startup source ?
  25. R-19) Why is my toplevel window always placed at the same
  26.       position by the window manager ?
  27. R-20) What should I do when I get an error message to stderr ?
  28. R-21) How can I use the mouse to arrange widgets?
  29. R-22) How can I set the values of sliders more accurately ?
  30. R-23) How can I create menubars ?
  31. R-24) Why is the xftutorial not running ?
  32. R-25) How can I make my X server secure ?
  33. R-26) I get "bad geometry" errors when I start XF, what is wrong ?
  34. R-27) How can I use the new packer ?
  35. R-28) I get "invalid command name ..." when I activate a XF function ?
  36. R-29) I get "couldn't find "true" to execute" when I call the help ?
  37.  
  38. Questions/Answers:
  39. ==================
  40.  
  41. R-1) How can I change the path/filenames that are used by XF ?
  42.         To change path/filenames that XF uses (i.e. if you
  43.         don't have writing permission), call the pull-down
  44.         menu item (Options | Path/file names).
  45.  
  46.  
  47. R-2) How can I create multiple toplevel windows ?
  48.         To create multiple toplevel windows you select the
  49.         item "Toplevel" from the "Standard" widget list.
  50.  
  51.  
  52. R-3) How can I show/hide toplevel windows ?
  53.         To display an XF created toplevel window, you should
  54.         use the automatically created function:
  55.  
  56.                 ShowWindow.toplevel
  57.  
  58.         To remove an XF created toplevel window, you should
  59.         use the automatically created function: 
  60.  
  61.                 DestroyWindow.toplevel
  62.  
  63.         where "toplevel" is the name of the toplevel window
  64.         that should be displayed or removed . When you are
  65.         running XF, please display and remove the toplevel
  66.         windows with the XF menu attached to the label
  67.         (Current widget path).
  68.  
  69.  
  70. R-4) How can I make a widget the "current widget" ?
  71.         Making a widget the "current widget" means that
  72.         actions like inserting a new widget or calling
  73.         parameter setting will apply to this widget.
  74.  
  75.         To make a certain widget the "current widget", you
  76.         can double click the middle mouse button on the
  77.         widget, or select the widget from the pull-down
  78.         menus that are bound to the single elements of the
  79.         displayed (Current widget path).  These menus allow
  80.         you to walk through the complete widget hierarchy.
  81.  
  82.         P.S. The "<Double-B2>" selection does not work for
  83.         menubuttons due to binding collisions (You can
  84.         change the binding if you want).
  85.  
  86.  
  87. R-5) How can I bind actions to buttons ?
  88.         To bind an action (procedure) to a button, first you
  89.         create the button, and then you call the parameter
  90.         setting for this button (either by making the button
  91.         the current widget (R-4) and selecting the menu item
  92.         (Configuration | Parameters), or by a double click
  93.         with your right mouse button on the button widget).
  94.  
  95.         Now you can edit the command string in the text
  96.         field at the bottom of the parameter window.
  97.  
  98.  
  99. R-6) How can I cut/copy/paste a widget ?
  100.         To cut/copy a widget, make it the current widget
  101.         (R-4), and select the menu item (Edit | Cut) or
  102.         (Edit | Copy). To paste the cutbuffer to the current
  103.         widget, select the menu item (Edit | Paste). When you
  104.         cut/copy/paste widgets, please keep in mind that the
  105.         widget names change. If the widget names are used in
  106.         commands, the commands must be adapted. If you refer
  107.         to the widgets via symbolic names, the symbolic name
  108.         must be attached again to the new widget.
  109.  
  110.  
  111. R-7) How can I delete a widget ?
  112.         To delete the "current widget", you have to select
  113.         the menu item (Edit | Delete).
  114.   
  115.  
  116. R-8) How can I create templates ?
  117.         To make a template, you simply put the widget
  118.         structure you want to save into the cut buffer. Then
  119.         you select the menu item (Edit | Save Cutbuffer
  120.         (tmplt)). It is also possible to select (Misc | Module
  121.         structure). Here you have a checkbutton at the
  122.         bottom, where you can specify that you want to
  123.         handle templates. Now you can select procedures and
  124.         a widget path. If you click (Save), the currently
  125.         selected procedures and the widget path are saved to
  126.         a file.
  127.  
  128.  
  129. R-9) How can I change the order of menubutton items ?
  130.         To change the position of a menu item in a menu, you
  131.         select the menu item in the item list of the menu,
  132.         and then slide the scale at right side of the
  133.         children list.
  134.  
  135.  
  136. R-10) How can I change the order of packed children ?
  137.         To change the position of a widget in a packed
  138.         parent, you select the widget in the children list,
  139.         and then slide the scale at right side of the
  140.         children list.
  141.  
  142.  
  143. R-11) How can I write my own procedures ?
  144.         There is a menu item (Programming | Procedures) which
  145.         gives you a window that allows full access to
  146.         procedures. When inserting new procedures, the
  147.         procedure list is rescanned. This takes some time,
  148.         and you should not click around during this time.
  149.         This would probably activate the editing for the
  150.         wrong procedure. The rescan can be turned off.
  151.  
  152.  
  153. R-12) How can I copy/paste between text fields ?
  154.         To select the text of an entry/text field, you simply
  155.         press the left mouse button over the text, and move
  156.         the mouse with the pressed button. To insert the
  157.         selected text into another entry/text field, type
  158.         "<Control-v>" or "<Control-y>".
  159.  
  160.  
  161. R-13) How can I retrieve the name of a specific widget ?
  162.         To get the name of a specific widget, you can press
  163.         "<Modifier1-B2>" (may be changed by you). This brings
  164.         up a small window with the name of the widget under
  165.         the mouse pointer. The name is inserted into
  166.         the selection buffer as well, so you can insert the name
  167.         into text fields by pressing "<Control-v>" or
  168.         "<Control-y>".
  169.  
  170.  
  171. R-14) How can I write source that is evaluated before XF
  172.       (and the created application) is actually started ?
  173.         This question sounds a bit complicated :-), but this
  174.         is what is wanted:
  175.  
  176.                 including external modules at application
  177.                 startup,
  178.                 parsing of passed arguments,
  179.                 something else ...:-).
  180.  
  181.         To insert source to the very beginning of the
  182.         application, you create a procedure named:
  183.  
  184.                 StartupSrc,
  185.  
  186.         by selecting the menu item
  187.         (Programming | Startup source).
  188.  
  189.         To insert source to the beginning of the
  190.         application after the toplevel widgets have been
  191.         created, you create a procedure named:
  192.  
  193.                 EndSrc,
  194.  
  195.         by selecting the menu item (Programming | End source).
  196.  
  197.  
  198. R-15) Is there a way to select colors/fonts etc. interactively ?
  199.         YES :-). To call a window with a color, font,
  200.         cursor, keysym, pixmap or file selection, you just
  201.         have to double click the right mouse button in the
  202.         entry field that will contain the resource value.
  203.  
  204.  
  205. R-16) How can I set widget names when they are created ?
  206.         To define a reasonable widget name when the widget
  207.         is created, you can use the button (Configure and
  208.         add) to create the widget. It is also possible to
  209.         set an option under (Options | General options). This
  210.         option is named (Ask for widget name on
  211.         insertion). If this option is selected, XF asks
  212.         you for a widget name before a new widget (or
  213.         template) is inserted.
  214.  
  215.  
  216. R-17) How can I change widget names ?
  217.         It is not possible to change the widget name
  218.         directly. But (!!!) you can use symbolic names to
  219.         access widget paths. Such a symbolic name makes you
  220.         independent from concrete widget hierarchies, and
  221.         the name can reflect the usage of the widget. There
  222.         is also a new feature named alias in XF. Here you
  223.         can define a new name for an already existing
  224.         command. To call the alias handling select
  225.         (Misc | Aliases).
  226.  
  227.  
  228. R-18) How can I access global variables in the startup source ?
  229.         To access global variables in the startup source
  230.         (like "auto_path" etc.), you have to make them
  231.         available with the global command ("global
  232.         auto_path").
  233.  
  234.  
  235. R-19) Why is my toplevel window always placed at the same
  236.       position by the window manager ?
  237.     Your toplevel is placed at the position you (or the
  238.     author of the program) gave the toplevel. To make
  239.     the window manager place your window, call the
  240.     parameter setting for the toplevel, and toggle the
  241.     switch (Set window position) and/or (Set window
  242.     size).
  243.  
  244.  
  245. R-20) What should I do when I get an error message to stderr ?
  246.     If there occur errors during the work with XF that are
  247.     producing output to stderr, these errors are mirrored
  248.     to the file xferrors in the XF tmp directory. If you
  249.     can say that they are caused by XF or you are not
  250.     sure, please send me the file so that I can locate
  251.     the problem.
  252.  
  253.  
  254. R-21) How can I use the mouse to arrange widgets?
  255.     Drag them with modifier1-button1 (Meta-Left Button
  256.     on Sun Sparcs). If you start dragging on the border,
  257.     this will start the resizing. You may want to set
  258.     default geometry to Placer, and allow layouting
  259.     without the layout window, both in
  260.     (Options | General).
  261.  
  262.        
  263. R-22) How can I set the values of sliders more accurately ?
  264.     Many sliders have to cover a wide range. The value
  265.     of a slider can be set with the cursor keys.
  266.  
  267. R-23) How can I create menubars ?
  268.     To define a menubar, you create menubuttons that
  269.     are all children of one frame. A menubutton is only
  270.     handled by XF if the underline resource is set to
  271.     something different than -1. 
  272.  
  273. R-24) Why is the xftutorial not running ?
  274.     Usually, there are two reasons why the XF tutorial
  275.     is not running.
  276.  
  277.     The first reason is that you probably started
  278.     xftutorial from the shell. Please run xftutrial from
  279.     inside XF by selecting the menu item
  280.     (Help | Tutorial).
  281.  
  282.     The second reason may be that your X server is not
  283.     secure, leading to an error message like this:
  284.         "X server insecure...". In this case, take a look at
  285.         the answer to question R-25.
  286.  
  287. R-25) How can I make my X server secure ?
  288.     Create the "~/.Xauthority" file on the systems you
  289.     want to use with Tk (use the tool xauth(1X)).
  290.     Disable xhost access, and restart the X server with
  291.     the -auth <fileName> option, or under xdm(1X). Some
  292.     users, on OpenWindows systems, have reported that
  293.     they need to log off and back on again to get the
  294.     window system to recognize the "~/.Xauthority" file.
  295.  
  296.     If you use xdm(1X), the "~/.Xauthority" file will be
  297.     modified automatically. If you call the X server by
  298.     hand, you have to add certain keys to the file using
  299.     xauth(1X). This will look about like this:
  300.     
  301.         key=`xauthkey`
  302.         xauth add ${HOST}:0  . $key
  303.         xauth add ${HOST}/unix:0  . $key
  304.         xinit $HOME/.xinitrc -- -auth $HOME/.Xauthority
  305.  
  306.     The program xauthkey is not part of the standard X
  307.     system. You just need a way to create a hexdecimal
  308.     random number. This can also be done by hand
  309.     interactively. My "~/.Xauthority" file looked (a long
  310.     time ago) like this (call "xauth list" to view the
  311.     file):
  312.  
  313.                 garfield:0  MIT-MAGIC-COOKIE-1  1234abcdef
  314.                 garfield/unix:0  MIT-MAGIC-COOKIE-1  1234abcdef
  315.  
  316.     If you still have problems, maybe the client that
  317.     cannot connect to your server has no access to your
  318.     "~/.Xauthority" file, or the display name you use is
  319.     not the same as in your "~/.Xauthority" file. If you
  320.     still have trouble, build your Tk with the security
  321.     flag disabled (SECURITY_FLAGS in the Makefile) or
  322.     take a deep look into the X security documentation.
  323.  
  324. R-26) I get "bad geometry" errors when I start XF, what is wrong ?
  325.     You probably have a default geometry specification
  326.     in your "~/.Xdefaults" file. This may look like
  327.     "*geometry: +0+0" or something similar. Please
  328.     remove this line, as it applies to all widgets in
  329.     your Tk application (like XF), and causes this
  330.     error.
  331.  
  332. R-27) How can I use the new packer ?
  333.     To use the new packer (when you use the packing
  334.     dialog, and when you save the code), you have to
  335.     activate the option (Create new packer code) in the
  336.     (Options | Source options) menu.
  337.  
  338. R-28) I get "invalid command name ..." when I activate a XF function ?
  339.     The tclIndex file that is installed by default is a
  340.     new style tclIndex file. If you are using a wish
  341.     older than Tk 3.3 you have to use the special
  342.     tclIndex file "tclIndex2.3" in the directory ./src
  343.     and in the directory ./templates/autoProcedures.
  344.     Please rename this file to "tclIndex". Installing
  345.     this old tclIndex file will mean that you cannot use
  346.     xf with a extended wish 3.3 or a later one. If you
  347.     really HAVE to use both versions, you should
  348.     install xf into two separate directories. Sorry...
  349.     but keeping XF backward compatible becomes more and
  350.     more difficult. To create old style tclIndex files
  351.     from xf you have to deselect the option (Create new
  352.     style tclIndex file) in the dialog (Options | Source
  353.     options).
  354.  
  355. R-29) I get "couldn't find "true" to execute" when I call the help ?
  356.     On some systems the unix command true(1) does
  357.     not exist. This causes trouble when you try to
  358.     run a external program. XF uses this unix command
  359.     to prevent noumerous of subprocesses. Please make
  360.     a dummy shell script (or a symbolic link to annother
  361.     small program), so XF can call this command (with a
  362.     minimum of overhead).
  363.  
  364.